// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_img.p_video;

import android.content.Context;
import android.graphics.Bitmap;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;

// Referenced classes of package com.nnee.p_img.p_video:
//            ImageViewTouchBase, u, a, aj, 
//            an

public class cls_d
{

    public cls_d(Context context, View view, cls_an an)
    {
        h = 0;
        i = 0;
        l = 3000;
        m = true;
        b = view;
        g[0] = (cls_ImageViewTouchBase)view.findViewById(0x7f0d0027);
        g[1] = (cls_ImageViewTouchBase)view.findViewById(0x7f0d0028);
        cls_ImageViewTouchBase aimageviewtouchbase[] = g;
        int i1 = aimageviewtouchbase.length;
        for(int j1 = 0; j1 < i1; j1++)
        {
            cls_ImageViewTouchBase imageviewtouchbase = aimageviewtouchbase[j1];
            if(imageviewtouchbase != null)
            {
                imageviewtouchbase.setVisibility(4);
                imageviewtouchbase.a(an);
            }
        }

        c = context;
        i = -1;
        Animation aanimation[] = new Animation[1];
        aanimation[0] = d(0x7f04000b);
        j = aanimation;
        Animation aanimation1[] = new Animation[1];
        aanimation1[0] = e(0x7f04000c);
        k = aanimation1;
        i = 0;
    }

    private Animation d(int i1)
    {
        return AnimationUtils.loadAnimation(c, i1);
    }

    private Animation e(int i1)
    {
        return AnimationUtils.loadAnimation(c, i1);
    }

    public Bitmap a(int i1, int j1)
    {
        Bitmap bitmap = null;
        if(a != null)
        {
            if(i1 < 0)
                i1 = 0;
            cls_a a1 = a.a(i1);
            if(a1 != null)
                bitmap = a1.f();
        }
        return bitmap;
    }

    public void a(int i1)
    {
        l = i1;
    }

    public void a(Bitmap bitmap)
    {
        cls_ImageViewTouchBase imageviewtouchbase = g[h];
        int i1 = 1 + h;
        h = i1;
        if(i1 == g.length)
            h = 0;
        cls_ImageViewTouchBase imageviewtouchbase1 = g[h];
        if(imageviewtouchbase1 != null)
        {
            imageviewtouchbase1.setVisibility(0);
            imageviewtouchbase1.a(new cls_aj(bitmap), true, true);
            imageviewtouchbase1.bringToFront();
            int j1 = i;
            imageviewtouchbase1.startAnimation(j[j1]);
            imageviewtouchbase1.setVisibility(0);
            Animation animation = k[j1];
            imageviewtouchbase.setVisibility(4);
            imageviewtouchbase.startAnimation(animation);
        }
    }

    public void a(cls_u u1)
    {
        a = u1;
    }

    public void a(boolean flag)
    {
        m = flag;
    }

    public boolean a()
    {
        return m;
    }

    public int b()
    {
        return l;
    }

    public int b(int i1)
    {
        int j1;
        if(a.b() > 0)
        {
            if(i1 < -1 + a.b())
                j1 = i1 + 1;
            else
                j1 = 0;
        } else
        {
            j1 = -1;
        }
        return j1;
    }

    public void b(Bitmap bitmap)
    {
        c(0);
        a(bitmap);
    }

    public void c()
    {
        cls_ImageViewTouchBase aimageviewtouchbase[] = g;
        int i1 = aimageviewtouchbase.length;
        for(int j1 = 0; j1 < i1; j1++)
            aimageviewtouchbase[j1].a();

    }

    public void c(int i1)
    {
        if(b != null)
            b.setVisibility(i1);
    }

    public int d()
    {
        int i1;
        if(a != null)
            i1 = a.b();
        else
            i1 = 0;
        return i1;
    }

    public void e()
    {
        if(a != null)
            a.d();
        a = null;
    }

    public static final int d = 0;
    public static final int e = 1;
    public static final int f = 2;
    public cls_u a;
    View b;
    Context c;
    private final cls_ImageViewTouchBase g[] = new cls_ImageViewTouchBase[2];
    private int h;
    private int i;
    private Animation j[];
    private Animation k[];
    private int l;
    private boolean m;
}
